updated screencapture function for Matlab 2014b (third party code)