Fix project Makefiles to work in Windows

Modify the mbedtls/Makefile and tests/Makefile files to avoid executing
POSIX shell commands. Furthermore, ensure that perl scripts explicitly
invoke the interpreter instead of relying on the environment to read
the shebang and find the interpreter, which can cause failures in
Windows.
diff --git a/Makefile b/Makefile
index 441d1f9..8c48dd1 100644
--- a/Makefile
+++ b/Makefile
@@ -55,11 +55,14 @@
 	$(MAKE) -C library clean
 	$(MAKE) -C programs clean
 	$(MAKE) -C tests clean
+ifndef WINDOWS
 	find . \( -name \*.gcno -o -name \*.gcda -o -name *.info \) -exec rm {} +
+endif
 
 check: tests
 	$(MAKE) -C tests check
 
+ifndef WINDOWS
 test-ref-configs:
 	tests/scripts/test-ref-configs.pl
 
@@ -90,3 +93,4 @@
 	then				    	\
 		rm -rf apidoc ;			\
 	fi
+endif