Work-function-controlled operation mode transition between photodiode and photoconductor modes in organic photodetectors