Added forward declarations for compatibility with g++ 4.7.