fixed warnings
ocl: add try-catch for OpenCL device getter
Merge pull request #2931 from alalek:mac_fix_master