Fixed some compilation issues under GCC on Linux