Legacy nvcc support

Hey,

unfortunately, commit 0ba046bc3ec7362b49d239d9d0947c2598a75ef0 (merge PR #1070) breaks compilation in our legacy environment (we currently use cuda toolkit 5.0 and nvcc with gcc 4.4). The compilation errors we get are of the following type:
```
emmintrin.h(1312): error: identifier "__builtin_ia32_vec_ext_v8hi" is undefined
```
This could be related to a similar issue with intrinsics when compiling under OSX (mentioned in #1070).

The proposed fix is to avoid inclusion of the opencv header when compiling with nvcc and the host gcc is < 4.7.

I kept the original workaround with the OSX flag for now, but my guess is the whole check could be simplified as:
```
#if __NVCC__
namespace cv {class Mat;}
#else
#include <opencv2/core/core.hpp>
#endif
```
that is, the cuda code does not actually require opencv, except for the class declaration `cv::Mat`.

The downside of this approach is that `ReadImageToCVMat` is not inlined.

@bhack thanks, I also suspected it, but then it should actually work (and it does work for me - see below).
@sguada I would need more details to help here - what exactly doesn't work?

This compiles on my machine:
in data_transformer.hpp:
`void Transform(const vector<cv::Mat>& cv_img, Blob<Dtype>* transformed_blob);`
in data_transformer.cpp:
```
template<typename Dtype>
void DataTransformer<Dtype>::Transform(const vector<cv::Mat>& cv_img, Blob<Dtype>* transformed_blob) {
  for (int item_id = 0; item_id < cv_img.size(); ++item_id) {
    Transform(cv_img[item_id], transformed_blob);
  }
}
```