Fixed memory leak in getSupportedModes() and added build script for your
pleasure