M-theory versus F-theory pictures of the heterotic string