Provide alternative code for Python < 2.7, which doesn't handle dictionary construction
Check explicitly for sys.version_info >= (2,7)
Merge pull request #383 from rjleveque/util_dictionary

Alternative code for older Python versions