OSX: fixing open file dialog memory allocation