Fix RELEASE compiler+linker options and errors