Changes required to compile with gfortran