Added some gfortran specific fixes for BRAMS compile