Fixed some problems related to compiling under Linux