Fix 'test' target compilation

Fixes #719