Fix tests/Makfile rule order.
Fix g++ 4.7.3 runtime compatibility.