France's greens and the left wing party of Jean-Luc Mélenchon have joined forces in a "historic moment" to face Macron before June's parliamentary elections.