Enhancement of thermoelectric efficiency in a two-level molecule