Fix build
Cleanup unit tests

UT_PTR_SET should be prefered instead of directly changing pointer
value, because it will automatically restore the value on teardown().
Not setting the pointer value back to its previous value might create a
situation where the tests fail when ran in a given order, which is a
nightmare to debug.

Also 'extern C' is not needed, because it only affects the name of the
symbol (C++ mangling), not the underlying ABI.
Merge pull request #2 from antoinealb/master

Fix & cleanup unit tests