Is there a bootloader for these versions of Atmega8? Or can the original bootloader for Atmega8 be used for ATMEGA8L-8PU and ATMEGA8A-PU ?
Comes down to fuse settings.
http://www.avr-developers.com/
Do the setup here, should have the stuff needed for that part.