vmem: fix race condition between library constructors

Some applications need to create pool in constructor
called before constructor from vmem.
Merge pull request #75 from spawlows/vmem-constructors-race

vmem: fix race condition between library constructors