Fixed compile-time errors for g++-4.7 and g++-4.4 with -O3