build: Fixing build and unit tests

Use only C++ and boost methods (memory copying, comparison, time
operations), which are guaranteed to be present on all platforms
with C++ and boost libraries.

Change-Id: Ia2883555c55909a4f7a877cf6d5fbd49b12c73c8