Localization of magnon modes in a curved magnetic nanowire