Only include test code during testing

Avoid EUnit dependency when not needed.