Fix build with gcc. Thanks to McBitter for testing.