Influence of electron-phonon interaction on spin fluctuation induced superconductivity