ITKv4 compatibility

Make the template source code build with ITK4 out of the box.