Fix testcase compile error on OS X 10.6+

Apply old fix from ticket #79 also to test code.