Fixed cmake scripts for pycaffe. (in branch)