Fix build on gcc (fixes #464)