Only include platform files when needed
diff --git a/include/polarssl/platform.h b/include/polarssl/platform.h
index 61b3119..22a1f46 100644
--- a/include/polarssl/platform.h
+++ b/include/polarssl/platform.h
@@ -29,7 +29,6 @@
 
 #include "config.h"
 
-#include <stdlib.h>
 #include <stdio.h>
 
 #ifdef __cplusplus
@@ -47,6 +46,7 @@
 #if defined(POLARSSL_MEMORY_C)
 #include "memory.h"
 #else
+#include <stdlib.h>
 #define polarssl_malloc     malloc
 #define polarssl_free       free
 #endif