Changes necessary to compile on Ubuntu 14.04

- fixes narrowing conversion
- EINTR was undefined so included cerrno
- Fixed CmakeLists.txt to include boost system which seems to now be required
- By default the compiler seems to be treating warnings as errors so deleted unused variables