fixing compilations.

Current master does not compile. 

This pull request might be complete noise if master is WIP.
With these minor fixes it may deviate from intentions of cross compiling for both 2.9.2 and 2.10.0.