You need to make the two images the same width. In your questions you mention, that the borders are the same width. If you now simply make the not checked image wider by adding transparent pixels everything should work.
To summarize: You need two images of the same size with same size and same position borders.
The Android Source does the same, have a look at the following two checkbox images: They have the same size (better visible on the github site: not checked, checked)