Checks for OSX in thirdparty/lws/mbedtls_wrapper/include/platform/ssl_port.h
to include stdlib.h instead of malloc.h.
The bug is fixed upstream in master via LWS_HAVE_MALLOC_H,
but not in the 2.4.1 branch (as the file structure has, one again,
changed).