Fixes for linux/gcc compilation