Updated to compile cleanly in the latest GCC