Malala says books can defeat terrorism at UK library opening