The island staunchly supported the UK through both world wars and remained in the Commonwealth when it became independent in 1964 .