Add fix to build engine.h/cpp under macosx

This is a fix to build the Engine class under MacOSX 10.9. 

*Don't merge this yet, still have to test this using travis.ci*