Fixes for GNUC build