On a problem of Nirenberg concerning expanding maps