Canada posted a trade surplus for the fourth consecutive month, with gold exports serving as the main driver.