New Zealand terrorist attack suspect grins in court