The Bible actually says that anyone that works righteousness and "fears God" is accepted by him. Jesus is not per se the only way to heaven except He is in the sense that Jesus is the mediator between God and man, and so when someone goes to heaven that doesn't know of Jesus, they meet Him there.
The Bible does say that people will be damned though for rejecting Jesus in rejecting the gospel. One has to assume that means they hear the real gospel and still reject it.