Fixes to compile with PGI compiler