Authorities declare emergency in quake-hit New Zealand city