Linux compilation

With the changes I am able to compile it under Arch Linux.
I am not very happy with that string cast, though.