I used (and would recommend) Stargate d20 with 3.5 edition D&D.
It's nearly compatible. I created some of my own classes for this to get the PC rules slightly closer to 3.5e, but I'm not sure that was needed.
As to the comment about not pulling the rug out from under the PC's by having them make sci-fi characters and giving them a D&D setting, the approach I took was to be upfront about it, during character creation. Sure, they are more likely to be carrying extra batteries and ammo when the change happens, but it's not like that's a bad thing!
It's nearly compatible. I created some of my own classes for this to get the PC rules slightly closer to 3.5e, but I'm not sure that was needed.
As to the comment about not pulling the rug out from under the PC's by having them make sci-fi characters and giving them a D&D setting, the approach I took was to be upfront about it, during character creation. Sure, they are more likely to be carrying extra batteries and ammo when the change happens, but it's not like that's a bad thing!