custom backend allocator support in octascript

This should fix running on Windows. Also replace usage of malloc/free in OF GUI.