more aggressive cleanup to fix cross compiling / matlab version issues