Made compilable with g++ 4.8.2 and fixed unit tests

Signed-off-by: Vinzenz Feenstra <vfeenstr@redhat.com>