Fixed python plugin to work with new layer factory.

Don't introduce this here -- see the link flag logic https://github.com/BVLC/caffe/blob/dev/CMakeLists.txt#L32-L37 and use `CAFFE_STATIC_LINK` instead