Hazarding a guess: you didn't remove the original package that came with Ubuntu; you left the locations for the manually compiled version at /usr/local, which (possibly?) come before the ones that came with the OS in the PATH; that would explain the correct version on the command line. The startup scripts use the hardcoded PATH to the old ones?
Edit the init script to point at the new demon :)