Made watermark allocator platform-independent