Compilation/porting fixes
Merge pull request #18 from CyberShadow/fixes-20140712

Compilation/porting fixes