Support shared memory locking

Support shared memory locks.

This resolves https://github.com/pagespeed/ngx_pagespeed/issues/144