Added fix from https://gist.github.com/adamchal/6457039 to make this module work with nginx 1.4.2+