Fix two compiler errors

Add a const specifier to _drawmenu_setting_edit_generic data argument, make freemem vars const "C". This fixes two regressions, caused by #1167 and #1191 .