Maggie Gyllenhaal was told she wasn't 'sexy enough' to get movie roles