Some fixes for linux compiling