PD0 is just defined to be the number 0 - there is nothing about that definition that will automatically cause the rest of the code to look for a button of port D instead of B. Take a look at other parts of the code which use PORTB and DDRB, since you will have to modify them to work with your new button.
Alternatively, you could do it without modifying the library, by copying some functions from the library into your code and modifying them to work with PORTD.