Fixing compilation issues on linux

Necessary to close #1280. (I don't want to close it with this pull request because hiker only wrote a workaround and is going to do a good fix soon.)