Fixed problems preventing C extensions from building on some platforms.