Fixed build and linking errors in GradientMagnitude and Pyramid (not all of them)