Make flatten function a variable to avoid strict mode errors.
Merge pull request #474 from jamesiarmes/strict-mode

Make flatten function a variable to avoid strict mode errors.