Algeria swings into trade deficit as energy earnings fall