Compilation/porting fixes

for testing pull on Travis-CI