Place egg in a bowl, and set aside. Combine sugar and cornstarch in a saucepan; stir well. Gradually add milk and maple syrup; stir with a wire whisk until blended. Bring to a boil over medium heat, and cook 1 minute, stirring constantly. Remove from heat. Gradually stir one-fourth of hot milk mixture into egg; add to remaining milk mixture, stirring constantly. Cook over medium heat 1 minute or until thickened, stirring constantly. Remove from heat; stir in margarine and vanilla. Pour mixture into a bowl; place plastic wrap on surface and chill.