vmem: fix race condition between library constructors

Some applications need to create pool in constructor
called before constructor from vmem.