Build mongodb and openssl in build directory.

Glasser's comments mostly.