Thailand posts record trade deficit