import MatrixToParams from https://sites.google.com/site/pgtwitter/qc_patch
support for XCode 5