pH-switchable polymer nanostructures for controlled release