Various fixes for Linux.