i think it is this problem and you have to rebuild (from cmake) using
OPENCV_HAVE_FILESYSTEM_SUPPORT=1