Fix YAML hash parsing and 1.9 compatibility