Re-add removed malloc call, apparently required on Linux