L-functions for modular forms and Weil's converse theorem