Maintain 1.8 compatibility in Dir.chdir spec