Concentrate on the "error" messages. Don't be too concerned with the "warning" messages (to begin with, at least).
To avoid the first "error" message that you see, try inserting "DEFINE => ' -DMOZILLA_INTERNAL_API'," into the WriteMakefile() section of the Makefile.PL ... and see how things pan out from there.