Newcastle booked their place in the last 32 of the Europa League thanks to a hard-fought 1-1 draw with Maritimo at St James' Park.